package com.barry.generator

import java.util.concurrent.atomic.AtomicInteger

/**
  * @ClassName Counter
  * @Description 报表线程计数器
  * @Author wangxuexing
  * @Date 2020/2/20 10:40
  * @Version 1.0
  */
object Counter {
  /**
    * 同时正在导报表上限
    */
  var MAX_COUNT = new AtomicInteger(2)
  /**
    * 同时正在导报表下限
    */
  var MIN_COUNT = new AtomicInteger(0)

  var counter = new AtomicInteger

  def count: Int = {
    counter.intValue()
  }

  def increment = {
    counter.incrementAndGet()
  }

  def decrement = {
    counter.decrementAndGet()
  }

  def main(args: Array[String]): Unit = {
    println("s")
  }
}

